﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FaultBackService.Shared
{
    public static class Global
    {
        /// <summary>
        /// 当前SCADA数据库服务器连接状态,true为正常,false为不正常
        /// </summary>
        public static bool SCADAConnectionState = true;

        /// <summary>
        /// 当前故障数据库服务器连接状态,true为正常,false为不正常
        /// </summary>
        public static bool FaultConnectionState = true;

        /// <summary>
        /// 故障数据库最新的十分钟平均数信息
        /// </summary>
       public static TenMeanInfo LastTenMeanInfo2;

        /// <summary>
        /// 故障数据库实时故障每日分析最新日期,首次是从数据库获取，之后在事务成功执行后，被赋值昨天的日期
        /// </summary>
        //public static DateTime LastTenMeanDailyDate= new DateTime(1970, 1, 1);

        /// <summary>
        /// 实时故障每日分析执行时间，每日1:00，执行一次后加一天
        /// </summary>
        public static DateTime ExcuteTimeOfRealTimeFaultDaily = DateTime.Today.AddHours(1);

        /// <summary>
        /// 当前的SCADA十分钟数据时间
        /// </summary>
        public static DateTime CurrentTenMeanTimeOfScada;

        /// <summary>
        /// 当前实时故障每日分析日期
        /// </summary>
        public static DateTime LastRealTimeFaultDailyDate;

        public static DateTime DefaultTime = new DateTime(1970, 1, 1);

        /// <summary>
        /// 实时故障的实时分析计数器
        /// </summary>
        public static int RealTimeCount = 0;

        public static DateTime LastTrendDailyDate;
    }


   

    public struct TenMeanInfo
    {
        public DateTime TimeStamp { get; set; }
        public int TurbineId { get; set; }

    }
}
